package jstudy.gu.user;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

@Getter
@Setter
@Accessors(chain = true)
@ToString
public class User {
	@TableId(type = IdType.AUTO)
	private Integer id;
	
	@ApiModelProperty(value = "名称" ,required =  true)
	@NotBlank(message = "{nameNotBlank}")
	private String name;
	
	
	@ApiModelProperty(value = "年龄" )
	@NotNull(message = "ageNotNull")
	@Min(value = 1,message = "ageNotBelow1")
	@Max(value = 100,message = "ageNotGt100")
	private Integer age;

}
